package ui.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import base.BaseBean;
import base.fragment.BaseFragment;
import com.dispatchapp.andlei.R;
import netWork.NetUtils;
import utils.Logger;

import java.util.Map;

/**
 * 跑腿頁面
 *
 * @author Andlei
 */
public class ErrandsFragment extends BaseFragment {

//    private TextView textFragment;

    private NetUtils netUtils;

    public static ErrandsFragment getInstance() {
        return new ErrandsFragment();
    }

    @Override
    public void onHiddenChanged(boolean hidden) {
        super.onHiddenChanged(hidden);
        if (hidden) {
           // toast("隐藏了");
        } else {
          //  toast("显示了");
        }
    }

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_errand;
    }

    @Override
    protected void findViews() {
        netUtils = new NetUtils(mContext, netRequestCallBack);
//        textFragment = getView(R.id.text_fragment);
    }

    @Override
    protected void formatViews() {
//        textFragment.setText("找到了，而且赋值成功");
    }

    @Override
    protected void formatData() {

    }

    @Override
    protected void getBundle(Bundle bundle) {

    }

    @Override
    public void onClick(View v) {

    }

    private NetUtils.NetRequestCallBack netRequestCallBack = new NetUtils.NetRequestCallBack() {
        @Override
        public void success(String action, BaseBean t, Map tag) {
            Logger.e("dadadadad", action);
        }

        @Override
        public void error(String action, Throwable e, Map tag) {

        }
    };
}
